<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>mini-vue</title>
    <script src="./js/dep.js"></script>
    <script src="./js/watcher.js"></script>
    <script src="./js/observer.js"></script>
    <script src="./js/compiler.js"></script>
    <script src="./js/vue.js"></script>
</head>
<body>
    <div id="app">
        <p><span>姓名: {{msg}}</span></p>
        <p>文本：<span v-text="msg"></span></p>
        <p><input v-model="msg" type="text"></p>
        <p><span>v-model</span></p>
        <p>{{count}}</p>
        <p><input v-model="count" type="text"></p>
        <p>v-html</p>
        <p v-html='htmlMsg'></p>
        <p>
            <button v-on:click='nihao'>点我试一下</button>
        </p>
    </div>
    <script>
        const vm = new Vue({
            el: "#app",
            data: {
                msg: 'hello world',
                count: 11,
                persion: {
                    name: 'zs'
                },
                htmlMsg: '<p>怎么了，输出了html标签!</p>'
            },
            methods: {
                nihao() {
                    console.log('你好')
                } 
            }
        })
    </script>
</body>
</html>